<%-- Created by IntelliJ IDEA. User: Administrator Date: 2021/12/5 0005 Time: 8:42 To change this template use File | Settings | File Templates. --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>首页</title>
        <script src="/asserts/vendors/jquery.min.js"></script>
        <link rel="stylesheet" href="/asserts/vendors/bootstrap-3.4.1-dist/bootstrap-3.4.1-dist/css/bootstrap.min.css" />
        <link rel="stylesheet" href="/asserts/vendors/font-awesome-4.7.0/font-awesome-4.7.0/css/font-awesome.min.css" />
        <link rel="stylesheet" href="/asserts/css/index.css" />
    </head>

    <body>
        <div class="container">
            <div class="row">
                <div class="col-md-12 header">
                    <img src="/asserts/img/logo.jpg" alt="logo" class="logo" />
                    <h1>Java 实训团队协作简单案例</h1>
                    <span class="login-user">
                        <i class="fa fa-user"></i>
                        <a class="username" href="/?target=resume"></a>
                    </span>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <ul class="side-menu">
                        <li>
                            <i class="fa fa-gg-circle"></i>
                            <a href="/?target=goods-list">商品管理</a>
                        </li>
                        <li>
                            <i class="fa fa-qq"></i>
                            <a href="/?target=user-list">用户管理</a>
                        </li>
                        <li>
                            <i class="fa fa-cog"></i>
                            <a href="#">权限管理</a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-9">
                    <jsp:include page="${t}" />
                </div>
            </div>
        </div>

        <script>
            window.addEventListener('load', () => {
                $.ajax({
                    url: '/common/userinfo',
                    method: 'get',
                    success(res) {
                        $('.username').text(res.name);
                    },
                });
            });
        </script>
    </body>
</html>
